﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YY.Admin.Core
{
    public static class SysUserEvents
    {
        /// <summary>
        /// 添加用户事件
        /// </summary>
        /// <param name="User"></param>
        public class AddUserEvent : PubSubEvent<SysUser> { }
        /// <summary>
        /// 更新用户事件
        /// </summary>
        /// <param name="OriginalUser"></param>
        /// <param name="UpdatedUser"></param>
        public class UpdateUserEvent : PubSubEvent<(SysUser Original, SysUser Updated)> { }
        /// <summary>
        /// 删除用户事件
        /// </summary>
        /// <param name="User"></param>
        public class DeleteUserEvent: PubSubEvent<SysUser> { }

        /// <summary>
        /// 设置用户状态事件
        /// </summary>
        /// <param name="User"></param>
        /// <param name="NewStatus"></param>
        public class  SetUserStatusEvent : PubSubEvent<(SysUser User, StatusEnum NewStatus)> { }
        /// <summary>
        /// 修改密码事件
        /// </summary>
        /// <param name="User"></param>
        public class  ChangePwdEvent : PubSubEvent<SysUser> { }
        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="User"></param>
        public class  ResetPwdEvent : PubSubEvent<SysUser> { }
        /// <summary>
        /// 解除登录锁定事件
        /// </summary>
        /// <param name="User"></param>
        public class  UnlockUserLoginEvent : PubSubEvent<SysUser> { }

        /// <summary>
        /// 注册用户事件
        /// </summary>
        /// <param name="User"></param>
        public class  RegisterUserEvent : PubSubEvent<SysUser> { }
        /// <summary>
        /// 用户登录事件
        /// </summary>
        /// <param name="User"></param>
        public class  LoginUserEvent : PubSubEvent<SysUser> { }
        /// <summary>
        /// 用户退出事件
        /// </summary>
        /// <param name="User"></param>
        public class  LoginOutEvent : PubSubEvent<SysUser> { }

        /// <summary>
        /// 更新用户角色事件
        /// </summary>
        public class  UpdateUserRoleEvent : PubSubEvent<(SysUser User, List<long> RoleIds)> { }

    }
}
